package shujia.day01;

/*
    赋值运算符：
        = , +=, -=, *=, /=, %=

 */
public class FuZhiOpt {
    public static void main(String[] args) {

//        int a = 3;
//
//        a+=4;
//        System.out.println(a);

        // short s=1, s = s+1;  错误❌
//        short s = 1;
//        s = (short) (s + 1);
//        System.out.println(s);


        // short s=1, s+=1;
        short s = 1;
        s += 1; // 并不是等于 s = s+1; 而是等于s = (short)(s + 1);
        System.out.println(s);

    }
}
